﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Reflection;
using System.Text;

namespace CodeMonkey.EditableObject.Core
{
    //使用接口分离实体和行为;
    //该接口在ModelBase[T]中被显式实现
    //用于PropertyDescriptor中读取和设置ModelBase[T]中T中的值
    //因为PropertyDescriptor中的GetValue()和SetValue()方法的参数中均有一个component ;指代的就是 the component class that the property is associated with,
    /// <summary>
    /// An interface for editable wrapper objects so that they can be reflected at design time. 
    /// </summary>
    interface ITransacableObject
    {
        object ReadPropertyValue(PropertyInfo property);

        void SetPropertyValue(PropertyInfo property, object value);
    }

    interface ITransacableObject<T> : ITransacableObject
    {
        T WrappedInstance { get; }
    }
}
